using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using DoAn_LyThuyet.HeThongXuLy;
using DoAn_LyThuyet.HeThongLuuTru;

namespace DoAn_LyThuyet.HeThongGiaoDien
{
    public partial class frmThongKeTaiSan : Form
    {
        public frmThongKeTaiSan()
        {
            InitializeComponent();
        }
        static public DataTable SelectTaiSan_ThongKe()
        {

            string sql = "select t.MaTaiSan,t.TenTaiSan, p.TenPhong, pb.NgayPhanBo, cn.TinhTrang from TaiSan as t,PhanBoTaiSan as pb, Phong as p, CapNhatTaiSan as cn where t.MaTaiSan = pb.MaTaiSan and p.MaPhong = pb.MaPhong and cn.MaPhong = pb.MaPhong";
            DataTable dt = DataAccess.GetTable(sql);
            return dt;
        }

        private void btthongke_Click(object sender, EventArgs e)
        {
            dataGridViewThongKe.DataSource = SelectTaiSan_ThongKe();
        }

        private void frmThongKeTaiSan_Load(object sender, EventArgs e)
        {
            dataGridViewThongKe.DataSource = SelectTaiSan_ThongKe();
        }

        private void btthoat_Click(object sender, EventArgs e)
        {
            this.Close();
        }
   
    }

}